<%@ page contentType="text/html;charset=UTF-8" language="java"  pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;  charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>博客首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Free HTML5 Website Template by freehtml5.co" />
    <meta name="keywords" content="free website templates, free html5, free template, free bootstrap, free website template, html5, css3, mobile first, responsive" />
    <meta name="author" content="freehtml5.co" />

    <!--字体图标-->
    <link href="${pageContext.request.contextPath}/static/javaex/pc/css/icomoon.css" rel="stylesheet" />
    <!--动画-->
    <link href="${pageContext.request.contextPath}/static/javaex/pc/css/animate.css" rel="stylesheet" />
    <!--jquery，不可修改版本-->
    <script src="${pageContext.request.contextPath}/static/javaex/pc/lib/jquery-1.7.2.min.js"></script>
    <!--全局动态修改-->
    <script src="${pageContext.request.contextPath}/static/javaex/pc/js/common.js"></script>
    <!--核心组件-->
    <script src="${pageContext.request.contextPath}/static/javaex/pc/js/javaex.min.js"></script>
    <!--表单验证-->
    <script src="${pageContext.request.contextPath}/static/javaex/pc/js/javaex-formVerify.js"></script>

    <!-- Facebook and Twitter integration -->
    <meta property="og:title" content=""/>
    <meta property="og:image" content=""/>
    <meta property="og:url" content=""/>
    <meta property="og:site_name" content=""/>
    <meta property="og:description" content=""/>
    <meta name="twitter:title" content="" />
    <meta name="twitter:image" content="" />
    <meta name="twitter:url" content="" />
    <meta name="twitter:card" content="" />

    <link href="https://fonts.googleapis.com/css?family=Work+Sans:300,400,500,700,800" rel="stylesheet">

    <!-- Animate.css -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/portStyle/css/animate.css">
   <%-- <!-- Icomoon Icon Fonts-->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/portStyle/css/icomoon.css">--%>
    <!-- Bootstrap  -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/portStyle/css/bootstrap.css">
    <!-- Theme style  -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/portStyle/css/style.css">

    <!-- Modernizr JS -->
    <script src="${pageContext.request.contextPath}/static/portStyle/js/modernizr-2.6.2.min.js"></script>
    <!-- FOR IE9 below -->
    <!--[if lt IE 9] -->
    <script src="${pageContext.request.contextPath}/static/portStyle/js/respond.min.js"></script>
    <![endif]-->

</head>
<body>

<div class="fh5co-loader"></div>

<div id="page1">
    <div id="fh5co-aside" style="background-image: url(${pageContext.request.contextPath}/static/portStyle/images/image_1.jpg)">
        <div class="overlay"></div>
        <nav role="navigation">
            <ul>
                <li><a href="${pageContext.request.contextPath}/front/index.action"><i class="icon-home"></i></a></li>
            </ul>
        </nav>
        <div class="featured">
            <span>Bio</span>
            <h2>个人博客 </a></h2>
        </div>
    </div>

    <div id="fh5co-main-content">

        <div class="fh5co-post">



            <div class="content-header">
                <div class="breadcrumb" style="display:block;padding-left:700px">
                    <span>文章列表</span>
                    <span >关于我</span>
                    <span ><a href="${pageContext.request.contextPath}/article/list.action">后台管理</a></span>
                </div>

            </div>
            <div>
            <%--遍历--%>
                <c:forEach items="${pageInfo.list}" var="article" varStatus="status" >
                    <div class="fh5co-entry padding">
                        <img src="/upload/${article.cover}">
                        <div>
                            <span class="fh5co-post-date">${article.updateTime}</span>
                            <span class="fh5co-post-date" style="display:block;padding-left:600px">${article.viewCount}</span>
                            <h2><a href="${pageContext.request.contextPath}/front/content.action?id=${article.id}">${article.title}</a></h2>
                           <%-- <p>${article.contentText}<a href="${pageContext.request.contextPath}/front/content.action?id=${article.id}">更多</a></p>--%>
                            <p>${article.contentText}<a href="${pageContext.request.contextPath}/front/content.action?id=${article.id}">更多</a></p>

                            <%--$("#contentText").val(rtn.text.substring(0,100));--%>
                        </div>
                    </div>
                </c:forEach>
            </div>
        </div>
        <%--分页--%>
        <div class="page">
            <ul id="page" class="pagination"></ul>
        </div>
    </div>
</div>

<%--<div class="gototop js-top">
    <a href="#" class="js-gotop"><i class="icon-arrow-up"></i></a>
</div>--%>

<!-- jQuery -->
<script src="${pageContext.request.contextPath}/static/portStyle/js/jquery.min.js"></script>
<!-- jQuery Easing -->
<script src="${pageContext.request.contextPath}/static/portStyle/js/jquery.easing.1.3.js"></script>
<!-- Bootstrap -->
<script src="${pageContext.request.contextPath}/static/portStyle/js/bootstrap.min.js"></script>
<!-- Waypoints -->
<script src="${pageContext.request.contextPath}/static/portStyle/js/jquery.waypoints.min.js"></script>
<!-- Stellar Parallax -->
<script src="${pageContext.request.contextPath}/static/portStyle/js/jquery.stellar.min.js"></script>
<!-- Main -->
<script src="${pageContext.request.contextPath}/static/portStyle/js/main.js"></script>

</body>
<script>

    /*分页*/
    var currentPage = "${pageInfo.pageNum}";
    var pageCount = "${pageInfo.pages}";
    javaex.page({
        id : "page",
        pageCount : pageCount,	// 总页数
        currentPage : currentPage,// 默认选中第几页
        position : "center",
        // 返回当前选中的页数
        callback:function(rtn) {
            /*alert("当前选中的页数：" + rtn.pageNum);*/
            search(rtn.pageNum);
        }
    });
    function search(pageNum) {
        if (pageNum == undefined) {
            pageNum =1;
        }
        var typeId = $("#type_id").val();
        var keyWord = $("#keyWord").val();
        window.location.href = "index.action?pageNum="+pageNum;
    }
    javaex.select({
        id : "select2"
    });

    javaex.tab({
        id : "tab",		// tab的id
        current : 1,	// 默认选中第几个选项卡
        mode : "mouseover",	// 鼠标移动切换选项卡
        // 切换选项卡后返回一个对象，包含选项卡的索引，从1开始计
        // 初始化会自动执行一次
        callback: function (rtn) {
            console.log(rtn.index);
        }
    });
</script>

</html>
